<template>
  <div class="list">
    <div class="listMain ">
      <div class="title flex jc-sb">
        <div class="flex ai-c">
          <Input prefix="ios-search" clearable placeholder="用户手机号即时搜索" style="width: 300px" />
          <div class="lineDiv flex ai-c">
            <div class="lineLable">等级筛选：</div>
            <Select v-model="tGrade" style="width:300px;text-align:left;">
              <Option value="1">1-99</Option>
            </Select>
          </div>
          <div class="lineDiv flex ai-c">
            <div class="lineLable">段位筛选：</div>
            <Select v-model="tDw" style="width:300px;text-align:left;">
              <Option value="1">初出茅庐-牛刀小试</Option>
            </Select>
          </div>
        </div>
        <Button type="primary" @click="addUser">添加用户</Button>
      </div>
      <Table stripe :columns="columnsT" :data="dataT"></Table>
      <div class="centerPage flex jc-c">
        <Page :total="100" show-sizer show-elevator />
      </div>
    </div>
    <!-- 添加用户 -->
    <Modal v-model="addUserModul" width="520">
      <p slot="header" class="headerStyle">
        <span>添加用户</span>
      </p>
      <div class="modulMain">
        <div class="lineModul flex ai-c">
          <div class="labalModul">用户手机号：</div>
          <Input v-model="mZdname" clearable placeholder="请输入字段名称" />
        </div>
      </div>
      <div class="modulMain">
        <div class="lineModul flex ai-c">
          <div class="labalModul">用户等级：</div>
          <Input v-model="mZdname" clearable placeholder="请输入字段名称" />
        </div>
      </div>
      <div class="modulMain">
        <div class="lineModul flex ai-c">
          <div class="labalModul">正确率：</div>
          <Input v-model="mZdname" clearable placeholder="请输入字段名称" />
          <div>%</div>
        </div>
      </div>
      <div class="modulMain">
        <div class="lineModul flex ai-c">
          <div class="labalModul">设置密码：</div>
          <Input v-model="mZdname" clearable placeholder="请输入字段名称" />
        </div>
      </div>
      <div class="modulMain">
        <div class="lineModul flex ai-c">
          <div class="labalModul">确认密码：</div>
          <Input v-model="mZdname" clearable placeholder="请输入字段名称" />
        </div>
      </div>
      <div slot="footer" class="flex jc-c">
        <Button type="primary" style="margin-right:20px;" @click="closeModal">取消</Button>
        <Button type="primary">确定</Button>
      </div>
    </Modal>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        addUserModul:false,
        tGrade:"1",
        tDw:"1",
        columnsT:[
          {
            title: '编号',
            align: 'center',
            key: 'no'
          },
          {
            title: '用户手机号',
            align: 'center',
            key: 'tname'
          },
          {
            title: '用户余额',
            align: 'center',
            key: 'lastName'
          },
          {
            title: '用户等级',
            align: 'center',
            key: 'tType'
          },
          {
            title: '段位',
            align: 'center',
            key: 'grade'
          },
          {
            title: '最近登录时间',
            align: 'center',
            key: 'segment'
          },
          {
            title: '千条正确率',
            align: 'center',
            key: 'platform'
          },
          {
            title: '提现记录',
            align: 'center',
            key: 'category'
          },
          {
            title: '操作',
            key: 'action',
            align: 'center',
            // fixed: 'right',
            width: 80,
            render: (h, params) => {
              return h('div', [
                h('span', {
                  style:{
                    color:"#E25252",
                    cursor: "pointer",
                    padding:"0 5px"
                  },
                  props: {
                    type: 'text',
                    size: 'small'
                  },
                  on: {
                    click: () => {
                      
                    }
                  }
                }, '禁用')
              ]);
            }
          }
        ],
        dataT:[
          {
            no: '1',
            tname: '京东商品详情模板',
            lastName: '2021/11/11',
            tType: '子模板',
            grade: '10',
          },
        ],
        mZdname:'',
      }
    },
    mounted(){
      
    },
    methods: {
      //打开新增字段弹框
      addUser(){
        this.addUserModul=true;
      },
      //关闭新增字段弹框
      closeModal(){
        this.addUserModul=false;
      },
    }
  }
</script>

<style lang="scss" scoped>
  .list{
    background-color: #F5F5F5;
    padding: 30px;
    .listMain{
      width: 100%;
      height: calc(100vh - 120px);
      box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
      background-color: #fff;
      padding: 20px;
      overflow-y: scroll;
      position: relative;
      .title{
        padding: 0 0 20px;
        .lineDiv{
          .lineLable{
            font-size: 14px;
            font-family: 'SourceHanSansCN-Medium, SourceHanSansCN';
            font-weight: 500;
            color: #333333;
            width: 85px;
            text-align: right;
            flex: 0 0 85px;
          }
        }
      }
      .centerPage{
        padding: 20px 0;
      }
    }
  }
   //弹框样式start
  .headerStyle{
    font-size: 18px;
    font-family: 'SourceHanSansCN-Medium, SourceHanSansCN';
    font-weight: 500;
    color: #333333;
    text-align: center;
  }
  /deep/ .ivu-modal-header{
    border-bottom: none !important;
    padding: 30px 0 10px;
  }
  /deep/ .ivu-modal-body{
    padding: 16px 35px !important;
  }
  /deep/ .ivu-modal-footer{
    border-top: none !important;
    padding: 30px 0;
  }
  .modulMain{
    .lineModul{
      padding-bottom: 20px;
      .labalModul{
        font-size: 14px;
        font-family: 'SourceHanSansCN-Medium, SourceHanSansCN';
        font-weight: 500;
        color: #333333;
        width: 100px;
        text-align: right;
        flex: 0 0 100px;
      }
    }
  }
  //弹框样式end
</style>
